$(function(){
	var service = new EbeimService();
	var user = plugin.cookieToJson(document.cookie);
    var jusername = $("#j-username"),
    	jrole = $("#j-role");
    
    jusername.html(user.username);
    if(user.role == "SYSADMIN"){
    	jrole.html("系统管理员");
    }else if(user.role == "ADMIN"){
    	jrole.html("管理员");
    }else{
    	jrole.html("普通用户");
    }
	service.safeBoxInfo({},function(data){
		$("#safeBoxUseSize").text(fileSizeTransferNoPoint(data.safeBoxSpaceSize));
		$("#safeBoxSpaceSize").text(fileSizeTransferNoPoint(data.userTotalSize));
		/*$("#safeBoxLastTime").text(data.safeBoxLastTime);*/
		$("#deviceCount").text(data.deviceCount);
		$("#directoryCount").text(data.directoryCount);
	});
})
